﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Masterpage_CommonXB : MasterPagebase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        initLink();
    }

    private void initLink()
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder(300);
        sb.Append("<link rel=\"stylesheet\" type=\"text/css\" href=\"").Append(ResolveFilePath("skin/99XB_cs/reset.css")).Append("\" />");
        sb.Append("<link rel=\"stylesheet\" type=\"text/css\" href=\"").Append(ResolveFilePath("skin/99XB_cs/99XB.css")).Append("\" />");
        sb.Append("<link rel=\"stylesheet\" type=\"text/css\" href=\"").Append(ResolveFilePath("skin/99XB_cs/jquery-ui-1.9.2.custom.min.css")).Append("\" />");
        sb.Append("<script type=\"text/javascript\" src=\"").Append(ResolveFilePath("Js/jquery-1.8.3.min.js")).Append("\"></script>");
        sb.Append("<script type=\"text/javascript\" src=\"").Append(ResolveFilePath("Js/jquery-ui-1.9.2.custom.min.js")).Append("\"></script>");
        sb.Append("<script type=\"text/javascript\" src=\"").Append(ResolveFilePath("Js/XB/common.js")).Append("\"></script>");
        sb.Append("<script type=\"text/javascript\"> ");
        sb.Append("var rootPath = \"").Append(ResolveFilePath("/")).Append("\";");
        sb.Append("var rootThemePath = \"").Append(ResolveThemeImagePath("/")).Append("\";");
        sb.Append("var memberID = \"").Append(this.Member.MemberID).Append("\";");
        sb.Append("var customerID = \"").Append(this.Member.CustomerID).Append("\";");
        sb.Append("</script>");
        this.litLink.Text = sb.ToString();
    }

    protected string GetSNSBaseUrl()
    {
        return System.Configuration.ConfigurationManager.AppSettings.Get("BlogSNSUrl");
    }

    //public string GetHomeUrl()
    //{
    //    //获取巴马教育局部门ID
    //    Guid _bm_departmentID;
    //    Expo.Training.Entity.Department_Info _bm_department = new Expo.Training.Entity.Department_Info();
    //    _bm_department.DepartmentName_LIKE = "巴马";
    //    _bm_department.Exist();
    //    _bm_departmentID = _bm_department.DepartmentID;

    //    Expo.Training.Entity.Department_Info _user_department = new Expo.Training.Entity.Department_Info();
    //    _user_department.DepartmentID = this.MemberDepartmentID;

    //    if (_user_department.Exist())
    //    {
    //        if (_user_department.KeyString.Contains(_bm_departmentID.ToString()))
    //        {
    //            return "/portal/bm/default.aspx";
    //        }
    //        else
    //        {
    //            return "/portal/xb/default.aspx";
    //        }
    //    }
    //    else
    //    {
    //        return "/portal/xb/default.aspx";
    //    }
        
    //}
}
